<?php  if (!defined("_ECRIRE_INC_VERSION")) return;
// If at list one function from this file is already defined we won't continue 
if (function_exists('pdk_set_message_ok')) return;
/**
 * SPIP Plugin Development Kit
 *
 * @author     Aleksey Yaroshchuk (aleksey.yaroshchuk@gmail.com)
 * @license    GNU/GPL
 * @package    plugins
 * @subpackage pdk
 * @category   outils
 * @copyright  (c) Aleksey Yaroshchuk 2011-2012
 * @link       http://www.spip-contrib.net/Developmet-Kit
 * @version    1.0.0
 */

// ------------------------------------------------------------------------

/**
 * Message Functions
 *
 * This file contain functions that will help to work with messages
 *
 * @package		plugins
 * @subpackage	pdk
 * @category	outils
 * @author		Aleksey Yaroshchuk (aleksey.yaroshchuk@gmail.com)
 * @link		http://www.spip-contrib.net/Developmet-Kit
 */

// ------------------------------------------------------------------------
/**
 *  Set global OK message
 *  
 *  @param string $message Text message to be shown in next #PDK_MESSAGE_OK compilation
 */
function pdk_set_message_ok($message, $namespace='default') {
    @session_start();
    $_SESSION['pdk_message_ok'][$namespace] = $message;
}
// ------------------------------------------------------------------------
/**
 *  Set global Error message
 *  
 *  @param string $message Text message to be shown in next #PDK_MESSAGE_ERROR compilation
 */
function pdk_set_message_error($message,$namespace='default') {
    @session_start();
    $_SESSION['pdk_message_error'][$namespace] = $message;
}
// ------------------------------------------------------------------------

?>